package com.ruoyi.biz;

import org.springframework.core.annotation.AliasFor;
import org.springframework.security.test.context.support.TestExecutionEvent;
import org.springframework.security.test.context.support.WithSecurityContext;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@WithSecurityContext(factory = MockLoginUserSecurityContextFactory.class)
public @interface MockLoginUser {

    String value() default "user";

    String username() default "";

    String[] roles() default { "USER" };

    String[] authorities() default {};

    String password() default "password";

    long deptId() default 2L;

    @AliasFor(annotation = WithSecurityContext.class)
    TestExecutionEvent setupBefore() default TestExecutionEvent.TEST_METHOD;
}